# -*- coding:utf-8 -*-
'''
Created on 2012-2-25

@author: Administrator
'''
from os.path import abspath, dirname
_file_path = abspath(dirname(__file__))
from env_helper import init_env
init_env(debug=True, base_path=_file_path, logfile='%s/logs/hero_battle.log' % _file_path, dburi='mysql://root:123456@localhost:3306/hero')

from gevent.server import StreamServer
from battle import battle_process
server = StreamServer(('0.0.0.0', 7000), battle_process)
server.serve_forever()